﻿<!DOCTYPE html>
<!--[if lt IE 9 ]> <html lang="en" dir="ltr" class="no-js ie-old"> <![endif]-->
<!--[if IE 9 ]> <html lang="en" dir="ltr" class="no-js ie9"> <![endif]-->
<!--[if IE 10 ]> <html lang="en" dir="ltr" class="no-js ie10"> <![endif]-->
<!--[if (gt IE 10)|!(IE)]><!-->
<html lang="en" dir="ltr" xmlns:th="http://www.thymeleaf.org"
      xmlns:vertical-align="http://www.w3.org/1999/xhtml">
<!--<![endif]-->

<head>
    <div th:replace="commons/public_head :: common_resource"></div>
    <title>FRIDAY | Coupons, Deals, Discounts and Promo codes Template</title>
</head>

<body id="body" class="wide-layout preloader-active">
    <!--[if lt IE 9]>
        <p class="browserupgrade alert-error">
        	You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.
        </p>
    <![endif]-->

    <noscript>
        <div class="noscript alert-error">
            For full functionality of this site it is necessary to enable JavaScript. Here are the <a href="http://www.enable-javascript.com/" target="_blank">
		 instructions how to enable JavaScript in your web browser</a>.
        </div>
    </noscript>
    <!-- Preloader -->
    <div id="preloader" class="preloader">
        <div class="loader-cube">
            <div class="loader-cube__item1 loader-cube__item"></div>
            <div class="loader-cube__item2 loader-cube__item"></div>
            <div class="loader-cube__item4 loader-cube__item"></div>
            <div class="loader-cube__item3 loader-cube__item"></div>
        </div>
    </div>
    <!-- End Preloader -->


    <div id="pageWrapper" class="page-wrapper">
        <!-- –––––––––––––––[ HEADER ]––––––––––––––– -->
        <div th:replace="commons/header :: public_header"></div>
        <!-- –––––––––––––––[ HEADER ]––––––––––––––– -->

        <!-- –––––––––––––––[ PAGE CONTENT ]––––––––––––––– -->
        <main id="mainContent" class="main-content">
            <!-- Page Container -->
            <div class="page-container ptb-60">
                <div class="container">
                    <div class="row row-rl-10 row-tb-20">
                        <div class="page-content col-xs-12 col-sm-8 col-md-9">

                            <!-- Checkout Area -->
                            <section class="section checkout-area panel prl-30 pt-20 pb-40">
                                <h2 class="h2 mb-20 h-title">订单信息</h2>
                                <form class="mb-30">
                                    <div class="row">
                                        <input id="addressId" type="hidden" th:value="${addressList.get(0).getAddressid()}">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label>姓名</label>
                                                <input type="text" id="conName" class="form-control" th:value="${addressList.get(0).getConname()}">
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label>省/直辖市</label>
												<select class="form-control province" name="province" >
													<option th:text="${addressList[0].getProvince()}">请选择</option>
												</select>
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label>市/市辖区</label>
                                                <select class="form-control city" name="city" >
													<option th:text="${addressList[0].getCity()}"></option>
												</select>
                                            </div>
                                        </div>
										
										<div class="col-md-6">
                                            <div class="form-group">
                                                <label>县</label>
                                                <select class="form-control county" name="town">
													<option th:text="${addressList[0].getCounty()}"></option>
												</select>
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label>手机号</label>
                                                <input type="text" class="form-control" placeholder="请输入手机号" id="conTel" th:value="${addressList[0].getContel()}">
                                            </div>
                                        </div>

                                    </div>

                                    <div class="form-group">
                                        <label>详细地址1</label>
                                        <input type="text" id="detailAddr" class="form-control" placeholder="请输入您的地址" th:value="${addressList[0].getDetailaddr()}">
                                    </div>
                                </form>
                                <a id="continue" class="btn btn-lg btn-rounded mr-10">继续</a>
                                <a href="/main" class="btn btn-lg btn-warning btn-rounded">取消订单</a>
                            </section>
                            <!-- End Checkout Area -->
                        </div>
                        <div class="page-sidebar col-xs-12 col-sm-4 col-md-3">

                            <!-- Blog Sidebar -->
                            <aside class="sidebar blog-sidebar">
                                <div class="row row-tb-10">
                                    <div class="col-xs-12">
                                        <!-- Recent Posts -->
                                        <div class="widget checkout-widget panel p-20">
                                            <div class="widget-body">
                                                <table class="table mb-15">
                                                    <tbody>
                                                    <tr>
                                                        <td class="color-mid">商品总价</td>
                                                        <td id="total_price" th:text="${totalPrice}"></td>
                                                    </tr>
                                                    <tr>
                                                        <td class="color-mid">商品原价</td>
                                                        <td id="old_price" th:text="${oldTotalPrice}"></td>
                                                    </tr>
                                                    </tbody>
                                                </table>
                                                <a href="/showcart" class="btn btn-info btn-block btn-sm">编辑购物车</a>
                                            </div>
                                        </div>
                                        <!-- End Recent Posts -->
                                    </div>
                                </div>
                            </aside>
                            <!-- End Blog Sidebar -->
                        </div>

                    </div>
                </div>
            </div>
            <!-- End Page Container -->


        </main>
        <!-- –––––––––––––––[ END PAGE CONTENT ]––––––––––––––– -->
        <section class="footer-top-area pt-70 pb-30 pos-r bg-blue">
            <div class="container">
                <div class="row row-tb-20">
                    <div class="col-sm-12 col-md-7">
                        <div class="row row-tb-20">
                            <div class="footer-col col-sm-6">
                                <div class="footer-about">
                                    <img class="mb-40" th:src="@{assets/images/logo_light.png}" width="250" alt="">
                                    <p class="color-light">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Laboriosam dolores quidem mollitia id ipsa nisi necessitatibus iure repudiandae aperiam, odit ipsam dolor fugiat corporis nesciunt illo nemo minus.</p>
                                </div>
                            </div>
                            <div class="footer-col col-sm-6">
                                <div class="footer-top-twitter">
                                    <h2 class="color-lighter">Twitter Feed</h2>
                                    <ul class="twitter-list">
                                        <li class="single-twitter">
                                            <p class="color-light"><i class="ico fa fa-twitter"></i><a href="#">@masum_rana :</a> Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore in reprehenderit.</p>
                                        </li>
                                        <li class="single-twitter">
                                            <p class="color-light"><i class="ico fa fa-twitter"></i><a href="#">@masum_rana :</a> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ratione id corrupti iusto cupiditate omnis.</p>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-12 col-md-5">
                        <div class="row row-tb-20">
                            <div class="footer-col col-sm-6">
                                <div class="footer-links">
                                    <h2 class="color-lighter">Quick Links</h2>
                                    <ul>
                                        <li><a href="deals_grid.html">Latest Deals</a>
                                        </li>
                                        <li><a href="coupons_grid.html">Newest Coupons</a>
                                        </li>
                                        <li><a href="contact_us_02.html">Contact Us</a>
                                        </li>
                                        <li><a href="404.html">Error 404</a>
                                        </li>
                                        <li><a href="terms_conditions.html">Terms of Use</a>
                                        </li>
                                        <li><a href="faq.html">FAQs</a>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                            <div class="footer-col col-sm-6">
                                <div class="footer-top-instagram instagram-widget">
                                    <h2>Instagram Widget</h2>
                                    <div class="row row-tb-5 row-rl-5">


                                        <div class="instagram-widget__item col-xs-4">
                                            <img th:src="@{assets/images/instagram/instagram_01.jpg}" alt="">
                                        </div>


                                        <div class="instagram-widget__item col-xs-4">
                                            <img th:src="@{assets/images/instagram/instagram_02.jpg}" alt="">
                                        </div>


                                        <div class="instagram-widget__item col-xs-4">
                                            <img th:src="@{assets/images/instagram/instagram_03.jpg}" alt="">
                                        </div>


                                        <div class="instagram-widget__item col-xs-4">
                                            <img th:src="@{assets/images/instagram/instagram_04.jpg}" alt="">
                                        </div>


                                        <div class="instagram-widget__item col-xs-4">
                                            <img th:src="@{assets/images/instagram/instagram_05.jpg}" alt="">
                                        </div>


                                        <div class="instagram-widget__item col-xs-4">
                                            <img th:src="@{assets/images/instagram/instagram_06.jpg}" alt="">
                                        </div>


                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-xs-12">
                        <div class="payment-methods t-center">
                            <span><img th:src="@{assets/images/icons/payment/paypal.jpg}" alt=""></span>
                            <span><img th:src="@{assets/images/icons/payment/visa.jpg}" alt=""></span>
                            <span><img th:src="@{assets/images/icons/payment/mastercard.jpg}" alt=""></span>
                            <span><img th:src="@{assets/images/icons/payment/discover.jpg}" alt=""></span>
                            <span><img th:src="@{assets/images/icons/payment/american.jpg}" alt=""></span>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        <!-- –––––––––––––––[ FOOTER ]––––––––––––––– -->
        <div th:replace="commons/footer :: public_footer"></div>

        <!-- –––––––––––––––[ END FOOTER ]––––––––––––––– -->

    </div>
    <!-- ––––––––––––––––––––––––––––––––––––––––– -->
    <!-- END WRAPPER                               -->
    <!-- ––––––––––––––––––––––––––––––––––––––––– -->


    <!-- ––––––––––––––––––––––––––––––––––––––––– -->
    <!-- BACK TO TOP                               -->
    <!-- ––––––––––––––––––––––––––––––––––––––––– -->
    <div id="backTop" class="back-top is-hidden-sm-down">
        <i class="fa fa-angle-up" aria-hidden="true"></i>
    </div>

    <!-- ––––––––––––––––––––––––––––––––––––––––– -->
    <!-- SCRIPTS                                   -->
    <!-- ––––––––––––––––––––––––––––––––––––––––– -->

    <div th:replace="commons/js/js_header_footer::public_js1"></div>

    <script th:src="@{/assets/js/area2.js}"></script>
	<script th:src="@{/assets/js/select.js}"></script>
	
</body>

<script>
    $(document).ready(function () {
       $("#continue").click(function () {
           $.ajax({
               url: "/orderFinish",
               dataType: "json",
               contentType: "application/json",
               data: {"oldPrice":$("#old_price").text(), "newPrice":$("#total_price").text(), "isPay":"false", "addressid":$("#addressId").val()},
               success: function (result) {
                   window.location.href = "/checkout/" + result.info.orderid + "/" + $("#total_price").text();
               }
           });
       })
    });
</script>
</html>
